@extends('layouts.mobile_main')

@section('title', '充值分享')

@section('resources')
    @parent
    <link rel="stylesheet" href="{{ env('CSS_DOMAIN') }}/css/public.css?v={{env('CSS_VERSION')}}">
    <script src="{{ env('JS_DOMAIN') }}/js/adaptation.js?v={{env('JS_VERSION')}}"></script>
    <style>
        .val{position: absolute;bottom: 1rem;left: 0;font-size: 0.5rem;width: 100%;}
        div p{text-align: center;color: #fff;width: 100%;}
        .down{width: 8rem;margin: 0.8rem 1.2rem;height: 1.2rem;line-height: 1.2rem;border-radius: 0.1rem;background-color: #9955c6;color: #fff;font-size: 0.6rem;border: 1px solid #fff;display: inline-block;text-align: center;}
        .down_mark{width: 100%;position: fixed;top: 0;left: 0;background: rgba(62,58,57,0.8);z-index: 10;display: none;}
        .down_mark p{width: 100%;height: 0.3rem;background: #393a3e;}
        .down_mark img{position: absolute;top: 0;left: 0;width: 10.8rem;height: 3.4rem;}
    </style>
@endsection

@section('content')
    <div class="down_mark">
        <p></p>
        <img src="{{env('IMAGE_DOMAIN')}}images/shop/arrow.png?v={{env('IMAGE_VERSION')}}" alt="">
    </div>
	<div style="background: url({{env('IMAGE_DOMAIN')}}/images/share_recharge.png?v={{env('IMAGE_VERSION')}}) 0 0 no-repeat;background-size: 10.8rem;height: 19.2rem;position: relative;">
        <div class="val">
            <p>翻贝网是一个能让钱翻倍花的平台，</p>
            <p>吃喝玩乐购，就用翻贝网，</p>
            <p>可以帮你省一半的钱哦！</p>
            @if($isweixin == 1)
                <p class="down fz_50 co_violet">App下载</p>
            @else
                @if($platform == 'iOS')
                    <a class="down fz_50 co_violet" href="https://itunes.apple.com/cn/app/id1172353317">App下载</a>
                @elseif($platform == 'Android')
                    <a class="down fz_50 co_violet" href="http://file.fbw-china.com/download/fbw.apk">App下载</a>
                @else
                    <a class="down fz_50 co_violet" href="">App下载</a>
                @endif
            @endif
        </div>
    </div>
@endsection

@section('scriptResources')
    @parent
    <script>
        window.onresize=function(){
            pagesp();
        }
        $(function(){
            var paysu_outer_h=$(window).height();
            $(".paysu_outer").css({"min-height":paysu_outer_h});
        })
        var isweixin = '{{$isweixin}}'; //‘1’表示微信，‘0’表示不是微信
        var wheight = $(window).height();
        window.onresize=function(){
            pagesp();
            wheight = $(window).height();
        }
        $(function(){
            if (isweixin == '1') {
                $('.down').click(function(){
                    $('.down_mark').height(wheight);
                    $('.down_mark').show();
                });
            }
            var paysu_outer_h=$(window).height();
            $(".paysu_outer").css({"min-height":paysu_outer_h});
        })
    </script>
@endsection